<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
</head>

<body>

    <div class="layui-fluid">
        <div class="layui-card">

            <div class="layui-card-body">
                <div style="padding-bottom: 10px;">
                    <button class="layui-btn layuiadmin-btn-administrator" data-type="add">添加</button>
                </div>

                <table id="LAY-administrator-manage" lay-filter="LAY-administrator-manage"></table>

                <script type="text/html" id="table-administratorlist-administrator">
                {{#  if(d.id != 1){ }}
                <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="reset_google_secret"><i class="layui-icon layui-icon-edit"></i>重置google验证</a>
                {eq name="currAdmin['role']['id']" value="1"}
                <a class="layui-btn layui-btn-xs" lay-event="reset"><i class="layui-icon layui-icon-edit"></i>重置密码</a>
                {/eq}
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-edit"></i>删除</a>
                {{#  } }}
                <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="sub_anchors"><i
                        class="layui-icon layui-icon-edit"></i>设定主播会话</a>
            </script>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '/layuiadmin/' //静态资源所在路径
            , version: "{:config('other.ui_version')}"
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'administrator', 'table'], function () {
            var $ = layui.$
                , form = layui.form
                , table = layui.table;

            //事件
            var active = {
                add: function () {
                    var index = layer.open({
                        type: 2
                        , title: '添加角色'
                        , content: '/admin/admin/add'
                        , maxmin: true
                    });
                    layer.full(index);
                }
            };

            $('.layui-btn.layuiadmin-btn-administrator').on('click', function () {
                var type = $(this).data('type');
                active[type] ? active[type].call(this) : '';
            });
        });
    </script>
</body>

</html>